home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Core Concepts in Art 2
/
Core Concepts in Art (Frames of Reference)(The McGraw-Hill Companies)(2004).iso
/
mac
/
media
/
create.swf
/
scripts
/
frame_1
/
DoAction.as
< prev
Wrap
Text File
|
2003-11-06
|
3KB
|
116 lines
function findFilePath(theChap, theQuest, theTarget)
{
if(theChap < 10)
{
if(theQuest < 10)
{
loadVariables("txtFiles/Ch0" + theChap + "-0" + theQuest + ".txt",theTarget);
}
else
{
loadVariables("txtFiles/Ch0" + theChap + "-" + theQuest + ".txt",theTarget);
}
}
else if(theQuest < 10)
{
loadVariables("txtFiles/Ch" + theChap + "-0" + theQuest + ".txt",theTarget);
}
else
{
loadVariables("txtFiles/Ch" + theChap + "-" + theQuest + ".txt",theTarget);
}
}
function findUserTxt(theChap, theQuest, theTarget)
{
if(theChap < 10)
{
if(theQuest < 10)
{
loadVariables(_root.filePath + "Ch0" + theChap + "-0" + theQuest + ".txt",theTarget);
}
else
{
loadVariables(_root.filePath + "Ch0" + theChap + "-" + theQuest + ".txt",theTarget);
}
}
else if(theQuest < 10)
{
loadVariables(_root.filePath + "/Ch" + theChap + "-0" + theQuest + ".txt",theTarget);
}
else
{
loadVariables(_root.filePath + "/Ch" + theChap + "-" + theQuest + ".txt",theTarget);
}
}
function findStartChapter()
{
i = 0;
while(i < _root.questionsWithImages.length)
{
if(_root.questionsWithImages[i] != undefined && _root.questionsWithImages[i].length != 0)
{
theChapter = i;
create_mc.doHighlight(i);
return undefined;
}
i++;
}
}
function createQuestionArray(whichChapter)
{
j = 1;
while(j <= this["chaptArray" + whichChapter].questionNum)
{
if(this["chapt" + whichChapter] == undefined)
{
this["chapt" + whichChapter] = new Array();
}
this["chapt" + whichChapter].push(j);
j++;
}
_root.questionsWithImages.push(this["chapt" + whichChapter]);
if(_root.questionsWithImages.length == _root.howManyChapters + 1)
{
findStartChapter();
i = 0;
while(i < _root.questionsWithImages[theChapter].length)
{
duplicateMovieClip("create_mc.variableHolder_mc","vh" + i,16384 + (200 + i));
i++;
}
j = 0;
while(j < _root.howManyChapters)
{
duplicateMovieClip("create_mc.chapter_mc","chapt" + j,16384 + (300 + j));
create_mc["chapt" + j].highlight_mc._visible = 0;
if(j < 9)
{
create_mc["chapt" + j]._x = create_mc.chapter_mc._x + 12 * j;
}
else
{
create_mc["chapt" + j]._x = create_mc.chapter_mc._x - 64 + 20 * j;
}
var chapterColor = new Color(create_mc["chapt" + j].theChap);
chapterColor.setRGB(_root.restColor);
create_mc["chapt" + j].theNum = j + 1;
if(j < _root.dropChapters)
{
create_mc["chapt" + j].chap_btn._visible = 0;
create_mc["chapt" + j]._alpha = 30;
}
j++;
}
findStartChapter();
create_mc.variableHolder_mc.firstTime = 1;
}
}
function greyOutEmptyTitles(whatToCheck)
{
if(_root.questionsWithImages[whatToCheck + 1].length == 0)
{
create_mc["chapt" + whatToCheck].chap_btn._visible = 0;
create_mc["chapt" + whatToCheck]._alpha = 30;
}
}